package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLDataException;

public class ThrowsDemo2 {
    public void something() throws IOException, AWTException{}
}


class  SubClass extends ThrowsDemo2{
    //public void something(){}//可以不抛异常
    //public void something() throws IOException, AWTException{}// 可以相同
    //public void something() throws IOException{}//可以抛部分
    //public void something() throws FileNotFoundException {}//可以抛子类异常
    //public void something() throws Exception{}//不可以抛超类异常
    //public void something() throws SQLDataException {}//不可以抛无关的其他异常
}